"use strict";
const mvc = require('cosjs.mvc');
//道具礼包解析
exports.add = function (id) {
    let num = arguments[1] || 1;
    let itype = this.iTypes(id);
    let config = mvc.config(itype['config'], id);
    if (!config) {
        return mvc.library("debug", 'itemPacks not exist', id);
    }
    let rows = config['rows'] || config['Coll'] || [];
    for (let item of rows) {
        if (mvc.library('random/Probability', item['val'])) {
            this.add(item['key'], item['num'] * num);
        }
    }
}